<?php
if (function_exists('date_default_timezone_set')) date_default_timezone_set('Europe/Rome');

$msg = isset($_GET['msg']) ? $_GET['msg'] : "";

$log = sprintf("[%s] %s | IP: %s | UA: %s REF: %s\n",
    date('Y-m-d H:i:s'),
    $msg,
    $_SERVER['REMOTE_ADDR'] ?? 'unknown',
    $_SERVER['HTTP_USER_AGENT'] ?? 'unknown',
    $_SERVER['HTTP_REFERER'] ?? 'unknown'
);
$name = __DIR__ . '/data/logs/'.date('Y-m-d').'_debug.log';
// echo $name;
file_put_contents($name, $log, FILE_APPEND);


?>